﻿#ifndef BUSS_MAIN_H
#define BUSS_MAIN_H

#include <QWidget>
#include <QSqlDatabase>

namespace Ui {
class Buss_main;
}

class Buss_main : public QWidget
{
    Q_OBJECT

public:
    explicit Buss_main(QWidget *parent = nullptr);
    ~Buss_main();
    void setBusiness1_id(int bus_id);
    void setBusiness1_name(QString name);

signals:
    void windowAboutToClose(); // 窗口即将关闭的信号

private slots:
    void on_pushButton_return_clicked();
    void on_pushButton_menu_clicked();
    void on_pushButton_order_clicked();
    void on_pushButton_comment_clicked();
    void on_label_welcome_linkActivated(const QString &link);

protected:
    void closeEvent(QCloseEvent *event) override; // 重写关闭事件

private:
    Ui::Buss_main *ui;
    int m_businessId;
    QString bus_name;
    QSqlDatabase db;
    void setupDatabase();
};

#endif // BUSS_MAIN_H
